use mtdb
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB
GO

CREATE TABLE OBJ_REF_RB
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB_INDEX1 ON OBJ_REF_RB (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__1
GO

CREATE TABLE OBJ_REF_RB__1
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__1_INDEX1 ON OBJ_REF_RB__1 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__2
GO

CREATE TABLE OBJ_REF_RB__2
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__2_INDEX1 ON OBJ_REF_RB__2 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__3
GO

CREATE TABLE OBJ_REF_RB__3
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__3_INDEX1 ON OBJ_REF_RB__3 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__4
GO

CREATE TABLE OBJ_REF_RB__4
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__4_INDEX1 ON OBJ_REF_RB__4 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__5
GO

CREATE TABLE OBJ_REF_RB__5
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__5_INDEX1 ON OBJ_REF_RB__5 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__6
GO

CREATE TABLE OBJ_REF_RB__6
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__6_INDEX1 ON OBJ_REF_RB__6 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__7
GO

CREATE TABLE OBJ_REF_RB__7
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__7_INDEX1 ON OBJ_REF_RB__7 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__8
GO

CREATE TABLE OBJ_REF_RB__8
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__8_INDEX1 ON OBJ_REF_RB__8 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__9
GO

CREATE TABLE OBJ_REF_RB__9
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__9_INDEX1 ON OBJ_REF_RB__9 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__10
GO

CREATE TABLE OBJ_REF_RB__10
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__10_INDEX1 ON OBJ_REF_RB__10 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__11
GO

CREATE TABLE OBJ_REF_RB__11
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__11_INDEX1 ON OBJ_REF_RB__11 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__12
GO

CREATE TABLE OBJ_REF_RB__12
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__12_INDEX1 ON OBJ_REF_RB__12 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__13
GO

CREATE TABLE OBJ_REF_RB__13
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__13_INDEX1 ON OBJ_REF_RB__13 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__14
GO

CREATE TABLE OBJ_REF_RB__14
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__14_INDEX1 ON OBJ_REF_RB__14 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__15
GO

CREATE TABLE OBJ_REF_RB__15
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__15_INDEX1 ON OBJ_REF_RB__15 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__16
GO

CREATE TABLE OBJ_REF_RB__16
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__16_INDEX1 ON OBJ_REF_RB__16 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__17
GO

CREATE TABLE OBJ_REF_RB__17
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__17_INDEX1 ON OBJ_REF_RB__17 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__18
GO

CREATE TABLE OBJ_REF_RB__18
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__18_INDEX1 ON OBJ_REF_RB__18 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__19
GO

CREATE TABLE OBJ_REF_RB__19
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__19_INDEX1 ON OBJ_REF_RB__19 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__20
GO

CREATE TABLE OBJ_REF_RB__20
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__20_INDEX1 ON OBJ_REF_RB__20 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__21
GO

CREATE TABLE OBJ_REF_RB__21
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__21_INDEX1 ON OBJ_REF_RB__21 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__22
GO

CREATE TABLE OBJ_REF_RB__22
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__22_INDEX1 ON OBJ_REF_RB__22 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__23
GO

CREATE TABLE OBJ_REF_RB__23
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__23_INDEX1 ON OBJ_REF_RB__23 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__24
GO

CREATE TABLE OBJ_REF_RB__24
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__24_INDEX1 ON OBJ_REF_RB__24 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__25
GO

CREATE TABLE OBJ_REF_RB__25
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__25_INDEX1 ON OBJ_REF_RB__25 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__26
GO

CREATE TABLE OBJ_REF_RB__26
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__26_INDEX1 ON OBJ_REF_RB__26 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__27
GO

CREATE TABLE OBJ_REF_RB__27
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__27_INDEX1 ON OBJ_REF_RB__27 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__28
GO

CREATE TABLE OBJ_REF_RB__28
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__28_INDEX1 ON OBJ_REF_RB__28 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__29
GO

CREATE TABLE OBJ_REF_RB__29
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__29_INDEX1 ON OBJ_REF_RB__29 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__30
GO

CREATE TABLE OBJ_REF_RB__30
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__30_INDEX1 ON OBJ_REF_RB__30 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__31
GO

CREATE TABLE OBJ_REF_RB__31
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__31_INDEX1 ON OBJ_REF_RB__31 (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__MTP
GO

CREATE TABLE OBJ_REF_RB__MTP
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__MTP_INDEX1 ON OBJ_REF_RB__MTP (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO

/* drop/create OBJ_REF_RB */
DROP TABLE OBJ_REF_RB__USER
GO

CREATE TABLE OBJ_REF_RB__USER
(
    RB_ID NUMERIC(16,0),
    TENANT_ID NUMERIC(7,0) NOT NULL,
    OBJ_DEF_ID VARCHAR(128) NOT NULL,
    REF_DEF_ID VARCHAR(128) NOT NULL,
    OBJ_ID VARCHAR(64) NOT NULL,
    OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL,
    TARGET_OBJ_DEF_ID VARCHAR(128) NOT NULL,
    TARGET_OBJ_ID VARCHAR(64) NOT NULL,
    TARGET_OBJ_VER NUMERIC(10,0) DEFAULT 0 NOT NULL
)
GO

CREATE INDEX OBJ_REF_RB__USER_INDEX1 ON OBJ_REF_RB__USER (TENANT_ID, OBJ_DEF_ID, RB_ID)
GO
